<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>
    <%@ include file="/common/query.jsp"%>
    <%@ include file="/common/det.jsp"%>
    <script type="text/javascript" src="${base}/js/plugin/jquery-form/jquery.form.min.js"></script>
    <script>
        var url='/order/manager?';
        $(function(){
            initIndex();
        });
        function initIndex(){

            var columns = [
                {field:'id',title:'id',hidden:true},
                {field:'memberGuardianId',title:'监护人',hidden:true},
                {field:'memberGuardianName',title:'监护人',
                    dialog:{
                        url:"${base}/member/guardian?fenpeiView=true",
                        width:300,
                        height:300,
                        select:function(iframe){
                            var row = iframe.getGridChecked()[0];
                            $('#crud-memberGuardianId').val(row.id);
                            $('#crud-memberGuardianName').val(row.guardianName);
                        }
                    }
                },
                {field:'memberId',title:'客户信息',hidden:true},
                {field:'memberName',title:'客户信息',
                    dialog:{
                        url:"${base}/member?fenpeiView=true",
                        width:300,
                        height:300,
                        select:function(iframe){
                            var row = iframe.getGridChecked()[0];
                            $('#crud-memberId').val(row.id);
                            $('#crud-memberName').val(row.username);
                        }
                }},
                {field:'amount',title:'总金额',insert:false,update:false,search:{type:"single"}},
                {field:'status',title:'状态',
                    input:{type:'radio',value : [
                        {text:"未支付",value:10,isDefault:true},
                        {text:'已支付',value:20},
                        {text:'已取消',value:30}]}},
            ];
            createQuery('body',columns,{pager:true,edit:true,xuhao:false,add:true,del:false,heji:false,singleSelect:true,
                toolbar:[
                    {text : '<a  class="pure-button pure-button-primary" >详细信息</a>',handler : function(){
                    var row = getGridChecked()[0];
                    window.top.tabAdd(""+row.memberGuardianName+"订单详情","${base}/order/订单详情?id="+row.id)
                }}]},url);
        }
    </script>
</head>
<body>
<div id="body"></div>
</body>
</html>